package com.mes.spc.rule;

public class SpcRule7 extends SPCCommandbase {

    public int id=7;
    public int warningCount=15;
    public String title="规则7";
    public String description="连续15点落在中心线两侧的1倍sigma区内";
    private int count;
    public boolean excute(double data, double usl, double lsl, double ucl, double lcl, double standard)
    {
        double bu =standard+ ucl / 3;
        double bl = standard + lcl / 3;
        if (data < bu && data > bl)
            count++;
        else
            count = 0;
        if (count >= 15)
            return true;
        return false;
    }

    public int getId() {
        return id;
    }

    public int getWarningCount() {
        return warningCount;
    }

    public String getTitle() {
        return title;
    }

    public String getDescription() {
        return description;
    }
}
